Transactional memory in a dynamic language
نویسندگان
چکیده
Concurrency control is mostly based on locks and is therefore notoriously difficult to use. Even though some programming languages provide high-level constructs, these add complexity and potentially hard-to-detect bugs to the application. Transactional memory is an attractive mechanism that does not have the drawbacks of locks, however the underlying implementation is often difficult to integrate into an existing language. In this paper we show how we have introduced transactional semantics into Smalltalk by using the reflective facilities of the language. Our approach is based on method annotations, incremental parse tree transformations and an optimistic commit protocol. The implementation does not depend on modifications to the virtual machine and therefore can be changed at the language level. We report on a practical case study, benchmarks and further and on-going work.
منابع مشابه
Transactional Runtime Extensions for Dynamic Language Performance
We propose exposing best-effort atomic execution, as provided by a simple hardware transactional memory (HTM), in a managed runtime’s bytecode interface. Dynamic language implementations built on such a runtime can generate more efficient, code, using speculation to eliminate the overhead and obstructions to optimization incurred by code needed to preserve rarely used language semantics. In thi...
متن کاملDynamic Separation for Transactional Memory
Implementations of language constructs over transactional memory have typically provided unexpected semantics, required the re-compilation of non-transacted code, or assumed new hardware. We introduce an alternative approach founded on a contract between the programmer and the language implementation in which strong semantics are provided to programs that are “correctly synchronized” in their u...
متن کاملHardware Transactional Memory Support for Lightweight Dynamic Language Evolution
Lightweight dynamic language runtimes have become popular in part because they simply integrate with a wide range of native code libraries and embedding applications. However, further development of these runtimes in the areas of concurrency, efficiency and safety is impeded by the desire to maintain their native code interfaces, even at a source level. Native extension modules’ lack of thread ...
متن کاملSoftware Transactions Meet First-Class Continuations
Software transactions are a promising technology that make writing correct and efficient shared-memory multithreaded programs easier, but adding transactions to programming languages requires defining and implementing how they interact with existing language features. In this work, we consider how transactions interact with first-class continuations. We demonstrate that different idiomatic uses...
متن کاملPerspectives on Transactional Memory
We examine the role of transactional memory from two perspectives: that of a programming language with atomic actions and that of implementations of the language. We argue that it is difficult to formulate a clean, separate, and generally useful definition of transactional memory. In both programming-language semantics and implementations, the treatment of atomic actions benefits from being com...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Computer Languages, Systems & Structures
دوره 35 شماره
صفحات -
تاریخ انتشار 2009